<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Jialeo\LaravelSchemaExtend\Schema;

class CreateTableKmsDailyTaskLogs extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('kms_daily_task_logs', function (Blueprint $table) {
            $table->id();

            $table->string("uniqueSign")->default("")->comment("创建批次标识");
            $table->unsignedBigInteger("shopId")->default(0)->comment("目标门店");
            $table->unsignedBigInteger("handlerUserId")->default(0)->comment("处理人uid");
            $table->json("approveUserIds")->comment("审批人uid集合");
            $table->unsignedTinyInteger("taskType")->default(0)->comment("任务类型");
            $table->text("desc")->comment("任务描述");
            $table->json("descImg")->comment("任务描述图片");

            $table->unsignedInteger('createdAt')->default(0)->comment('创建时间');
            $table->unsignedInteger('createdByUid')->default(0)->comment('创建人');
            $table->unsignedInteger('updatedAt')->default(0)->comment('修改时间');
            $table->unsignedInteger('updatedByUid')->default(0)->comment('修改人');

            $table->tinyInteger("isDeleted")->default(0)->comment("是否删除,0:未删除,1:已删除");
            $table->collation = 'utf8mb4_general_ci';
            $table->comment   = '日常任务记录表';
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('kms_daily_task_logs');
    }
}
